# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=xorg-xdriinfo
pkgver=1.0.5
pkgrel=2
pkgdesc="Query configuration information of DRI drivers"
arch=('i686' 'x86_64')
url="https://xorg.freedesktop.org/"
license=('custom')
depends=('libx11' 'libgl')
makedepends=('xorg-util-macros' 'glproto')
groups=('xorg-apps' 'xorg')
source=(https://xorg.freedesktop.org/archive/individual/app/xdriinfo-${pkgver}.tar.bz2{,.sig}
        fix_with_glvnd.patch)
sha256sums=('4cba3766ef89557422062287248adeb933999071bad6f3ef9c0a478a3c680119'
            'SKIP'
            '7668f4aac504ac8e68b9ad7ce170867f645dd22981f8f9efc47860810b7f5bf8')
validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith <alan.coopersmith@oracle.com>

prepare() {
  cd xdriinfo-${pkgver}
  # FS#54228
  # https://cgit.freedesktop.org/xorg/app/xdriinfo/commit/?id=6273d9dacbf165331c21bcda5a8945c8931d87b8
  patch -Np1 -i ../fix_with_glvnd.patch
}

build() {
  cd xdriinfo-${pkgver}
  ./configure --prefix=/usr
  make
}

package() {
  cd xdriinfo-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
